We can be certain that the books of the bible were regarded as such since the begining.
The Muratorian Fragment lists 22 of the 27 NT books as canonical. It dates to 170 AD.
The document is called a fragment because portions of the document have been torn off. The well known biblical scholar Westcott states that the missing books were probably included initially because the document is torn where they should have been listed.